﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Samples.RequestHandlers
{
	public class ListBorrowers : Albatross.ServerSide.Messaging.RequestHandler<Samples.Contract.RequestsAndResponses.ListBorrowersI>
  {
		public override Albatross.Common.Messaging.Response Handle( Samples.Contract.RequestsAndResponses.ListBorrowersI request )
    {
		var response = new Samples.Contract.RequestsAndResponses.ListBorrowersO();
		var theBorrowers = new List<Samples.Entities.Borrower>();
		theBorrowers.Add( new Samples.Entities.Borrower()
            {
              FirstName = "Fred",
              LastName = "FirstTimer"
            });
		theBorrowers.Add( new Samples.Entities.Borrower()
      {
        FirstName = "Mary",
        LastName = "FirstTimer"
      });
      response.MyBorrowers = theBorrowers;
      return response;
    }
  }

}
